Files comprising a file system, or separately-stored portions thereof (e.g., segments or “chunks”), may become subject to being deleted, e.g., once they are no longer referenced by any live file system object. For example, file segments stored in a cloud-based or other object store may become subject being deleted if the file(s) with which the segments are associated are deleted from the file system.
A reference count may be used to ensure a segment (chunk) is retained at least so long as at least one file or other file system object references the segment. Even once the reference count has been decremented to zero, however, it may be necessary to retain a segment (chunk). For example, a chunk that is no longer referenced by any live file system object may still need to be retained, e.g., because the segment (chunk) was referenced by a file or other object at the time a snapshot or backup that is still being retained was created.